import {getStorage,setStorage} from "@/unitils/storage"
import route from "@/router"

export default{
    namespaced:true,
    state:{  
        parameter:getStorage("parameter")||{
            color:'#fff',
            particleOpacity:1,   
            particlesNumber:60,  
            shapeType:'star',  
            particleSize:3,  
            linesColor:'#000',  
            linesWidth:1,    
            lineLinked:true,     
            lineOpacity:1,   
            linesDistance :140,          
            moveSpeed:2,     
            hoverEffect:true,    
            hoverMode:'grab',  
            clickEffect:true,    
            clickMode:'push',  
            
        },
        keyshuax:true,
    },
    mutations:{
         setparameter(state, parameter){
            state.keyshuax = false
             state.parameter = parameter;
            setStorage("parameter", state.parameter);
            state.keyshuax = true

            // route.go(0).catch(()=>{
            //     console.log("重复进入路由")
            // });
            // state.keyshuax += 1

        },
    },
    actions:{

    }
}